package com.ryx.server;

/**
 * Created by lenovo on 2016/10/25.
 */
public abstract class BootJob {
    private BootJob next;

    protected abstract void start();

    public void startNext() {
        if (next != null) {
            System.out.printf("start next bootstrap job [{}]", next.getClass().getSimpleName());
            next.start();
        }
    }

    public BootJob setNext(BootJob next) {
        this.next = next;
        return next;
    }
}
